package com.emoji.service.impl;

import org.springframework.stereotype.Service;

import com.emoji.dao.EmojiMapper;
import com.emoji.model.Emoji;
import com.emoji.service.IEmojiService;

import javax.annotation.Resource;

@Service("emojiService")
public class EmojiServiceImpl implements IEmojiService {

    @Resource
    private EmojiMapper emojiMapper;

    @Override
    public Emoji selectByPrimaryKey(int id) {
        return emojiMapper.selectByPrimaryKey(id);
    }

    @Override
    public int save(Emoji emoji) {
        return emojiMapper.insertSelective(emoji);
    }
    
    @Override
    public int update(Emoji emoji){
    	return emojiMapper.updateByPrimaryKeySelective(emoji);
    }
    
    @Override
    public Emoji getByOne(){
    	return emojiMapper.getByOne();
    }
}